package com.cupdata.zicon.chain;

import org.junit.Test;

/**
 * 职责连测试方法
 */
public class ChainTest {

    @Test
    public void chainTest(){
        Request request=new Request("request初始化完毕");
        Response response=new Response("response初始化完毕");
        FilterChainImpl filterChain = new FilterChainImpl();
        filterChain.addFilter(new ChacterFilter())
                .addFilter(new EncodeFilter());
        filterChain.doFilter(request,response);
        System.out.println(request.getData());
        System.out.println(response.getData());
    }
}
